package com.basker.pisces.domain.event;

import org.springframework.context.ApplicationEvent;

import com.basker.pisces.spring.SpringApplicationContext;

/**
 * 领域事件抽象类
 *
 * @author hangwen
 */
public abstract class DomainEvent extends ApplicationEvent {

    private static final long serialVersionUID = 8127739373649427743L;

    /**
     * 发布领域事件
     *
     * @param event
     */
    public static void publish(DomainEvent event) {
        SpringApplicationContext.getInstance().publishEvent(event);
    }

    public DomainEvent(Object source) {
        super(source);
    }

}
